﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Ext.Net;
namespace BitPortal.Controls
{
    public class BaseAdminPage : System.Web.UI.Page
    {
        /// <summary>
        /// Hiện hộp thông báo
        /// </summary>
        /// <param name="message"></param>
        /// <param name="title"></param>
        /// <param name="icon"></param>
        /// <param name="buttons"></param>
        public void ShowMessage(string message, string title = "Thông báo", MessageBox.Icon icon = MessageBox.Icon.WARNING,MessageBox.Button buttons = MessageBox.Button.OK)
        {
            X.Msg.Show(new MessageBoxConfig() { Title = title, Message = message, Modal = true, Icon = icon, Buttons = buttons });
        }

        /// <summary>
        /// Hiện lời nhắc
        /// </summary>
        /// <param name="message"></param>
        /// <param name="title"></param>
        /// <param name="icon"></param>
        public void ShowNotification(string message, string title = "Thông báo", Icon icon = Icon.Accept)
        {
            Notification.Show(new NotificationConfig() { Title = title, Html = message, Icon = icon });
        }
    }
}